package com.fuhe.chen.vendingmachine.service;

import com.fuhe.chen.vendingmachine.dto.CommodityInBasket;

import java.util.List;

public interface IBasketService {

    /**
     * 增加商品信息到购物车
     * @param commodity_id
     * @param commodity_specification_id
     * @param count
     * @param user_id
     */
    Integer addCommodityToBasket(Integer commodity_id, Integer commodity_specification_id, Integer count, String user_id);

    /**
     * 从购物车中删除商品信息
     * @param basket_detail_id
     */
    void deleteCommodityFromBasket(Integer basket_detail_id);

    /**
     * 从购物车中获取商品信息
     * @param user_id
     * @return
     */
    List<CommodityInBasket> queryCommodityFromBasket(String user_id);
}
